package com.indexingsystem.system.service;

import java.util.List;

import com.indexingsystem.boss.common.PagedResult;
import com.indexingsystem.boss.entity.UserRole;

public interface IUserRoleService {

	int deleteByPrimaryKey(String userRoleId) throws Exception;

	int insertSelective(UserRole record) throws Exception;

	PagedResult<UserRole> selectUserRoleList(Integer pageNo, Integer pageSize);

	UserRole selectByPrimaryKey(String userRoleId);

	int updateByPrimaryKeySelective(UserRole record) throws Exception;

	/**
	 * 统计角色id查询角色包含的用户列表.
	 * 
	 * @param roleId
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	PagedResult<UserRole> selectUserListByRoleId(String roleId, Integer pageNo, Integer pageSize);

	/**
	 * 获取角色包含用户总列表总数.
	 * 
	 * @return
	 */
	Integer getUserRoleListCount(String roleId);

	/**
	 * 批量新增用户角色关系信息.
	 * 
	 * @param userRoleList
	 * @return
	 */
	int addUserRolesBatch(List<UserRole> userRoleList) throws Exception;

	/**
	 * 批量删除用户角色关系信息.
	 * 
	 * @param userRoleIdList
	 * @return
	 */
	int deleteUserRolesBatch(List<String> userRoleIdList) throws Exception;
	
	UserRole selectByPrimaryUserId(String userId);

	List<UserRole> getDhUserRoleList(String userId);
}